1. Field of the Invention
The present invention is generally directed to a signal generator that samples an input and generates a signal that is an image of the input signal. More particularly, the invention is directed to a signal generator in which the level variations of the input signal change in synchronization with the sampling rate.
2. Description of the Prior Art
Signal generators have been used to generate a signal that is an image of an input signal. An image of an input signal is a signal that is the mirror-like reflection of the input signal. FIG. 1A illustrates such a signal generator. Typically, the signal generator includes a keyboard 2, and an image controlling means 4. Keyboard 2 typically includes a button switch 8; an oscillator 10; a change-over switch 12 which includes three terminals 12c, 12d and 12e. Change-over switch 12 selectively connects oscillator 10 to one of the terminals 12c, 12d, or 12e. Contact 12e is an earth (ground) contact and contacts 12c and 12d are connected to time constant circuits 12a and 12b, respectively. Time constant circuits 12a and 12b each include a capacitor and a resistor designed to alter the output signal from oscillator 10. The frequency of the signal from oscillator 10 is a function of which time constant circuit is connected to the oscillator 10. Button switch 8, oscillator 10 and change-over switch 12 are connected in a circuit. If the button switch 8 is not pressed, the circuit is open and no output signal is transmitted from oscillator 10. When button switch 8 is pressed, the output signal of oscillator 10 (which is dependent on the switch status of changeover switch 12), a continuously level-varying signal, is transmitted to image controlling means 4.
The image controlling means 4 includes a microprocessor 6 which receives the input signal from the keyboard 2 via a KEY IN terminal. The microprocessor 6 internally samples &:he input signal by making an instantaneous measure of the amplitude value of the input signal.
FIG. 1B is a block diagram showing the microprocessor 6 of the image processing means 4 of the prior art. The microprocessor 6 includes a level variation detecting means 20 which includes an input port 20a, and a sampling period generating means 22 which includes a timer 22a. Both the level variation detecting means 20 and the sampling period generating means 22 are controlled by software executed by a control section 24. The level variation detecting means 20 and the sampling period generating means 22 are coupled to the control section 24 by a first internal bus 26a.
The microprocessor 6 also includes: a bus interface register 28; an instruction register 30; an instruction decoder 32; data registers 34 and 36 which are connected to an arithmetic logic unit (ALU) 38; a plurality of control registers 40; second, third and fourth internal busses 26b, 26c and 26d; a lower address register 42a; and an upper address register 42b.
As shown in FIG. 1B, the input signal from the KEY IN terminal is latched by the input port 20a of the level variation detecting means 20. The latched input signal is output to the control section 24 via the first internal bus 26a. The control section outputs to the timer 22a of the sampling period generating means 22 a control frequency command which causes the timer 22a to generate a sample signal at a frequency in accordance with the control frequency command.
The sampling period generating means 22 outputs the sample signal at the above-mentioned frequency. In response to the sample signal, the level variation detecting means 20 samples the input signal (i.e. signal output from keyboard 2). The level variation detecting means 20 samples the input signal in response to the sample signal from the sampling period generating means 22. Sampling in general is understood to mean an instantaneous measure of the amplitude value of the input signal. Thus, the level variation detecting means 20 samples the input signal by latching the input signal in response to the sample signal from the sampling period generating means 22. The level variation detecting means 20 includes, for example, a memory unit such as a Flip-flop and a RAM which are able to store the value of the sampled input signal.
Level variation detecting means 20 detects when the level of the sampled input signal varies from the previously sampled signal by comparing the currently sampled level with the previously sampled level stored in the memory unit of level variation detecting means 20.
The signal generator of FIG. 1A and 1B operates as follows. When change-over switch 12 is set so that one of the two time constant circuits 12a and 12b are connected in circuit with oscillator 10, oscillator 10 generates an oscillating signal at a frequency corresponding to the time constant of the time constant circuit chosen, either 12a or 12b. When button switch 8 is pressed, a signal from oscillator 10, a continuously level-varying signal, is transmitted from keyboard 2. When button switch 8 is not pressed no signal from oscillator 10 is transmitted from keyboard 2.
If change-over switch 12 is switched so that oscillator 10 is connected to ground terminal 12e, the output from oscillator 10 is essentially ground level. As a result, the input signal is ground level while the change-over switch 12 is switched.
The signal generated from oscillator 10 is transmitted from keyboard 2 to level variation detecting means 20 in the image controlling means 4. Level variation detecting means 20 receives a sample signal from sampling period generating means 22 as discussed above. The sampled input signal is compared to the sampled signal taken during the previous sampling period. Level variation detecting means 20 detects any level variation between the current sampled value of the input signal and the previously sampled value. If level variation detecting means 20 has detected a level variation in the input signal, it causes a change to occur in the image signal of the input signal so that the image signal mirrors the input signal. Therefore, the signal generator creates a signal that is the image of the input signal created by oscillator 10.
In the signal generator described above, there is no means for synchronizing the signal generated by oscillator 10 with the sampling command sent from sampling period generating means 22. Because of this, level variations that occur in the input signal may go undetected in the image controlling means 4. Level variation detecting means 20 of the prior art generators receive sampled input signal values that have been sampled according to the command sent from sampling period generating means 22. If level variation detecting means 20 only samples the input signal when the level of the input signal is "high", for example, there will be no detection of any level variations in the input signal even though during the period of time when the input signal is not being sampled its levels may vary continuously. The reason for this is that the previously sampled input signal is compared with the currently sampled input signal. Since, in the example described above, the input signal is only sampled at its "high" level there is no variation between these two sampled values for level detecting means 20 to detect. As a result the image signal of the input signal will not accurately reflect the input signal because of the fact that not all of the level variations of the input signal were detected.